<html>
<head>
<title>some svg game</title>
<meta coding="utf-8">
<script type="text/javascript" src="jquery.js"></script>
<script>
	x = 0;
	cursor = document.getElementById("cursor");

	$(document).ready(function(){
		
	});
	function left()
	{
		x-=1;
		cursor.setAttribute("x",x);
	}
	function right()
	{
		x+=1;
		cursor.setAttribute("x",x);
		$("#status").html(x);
	}
	$(document).keydown(function(event){ //jk-navigation
		$("#status").html("Pressed: "+event.which)
		switch(event.which)
		{
			case 116:  break; //F5
			case 122:  break; //F11
			case 37: left(); break;
			case 39: right(); break;
			default: event.preventDefault();
		}
	});
</script>
</head>
<body>
<div id="status">Почекайте...</div>
<svg viewBox="0 0 800 600">
<rect x="0" y="0" width="800" height="600" style="fill:black;stroke:black" />
<rect id="cursor" x="0" y="0" width="10" height="10" style="fill:green;" />
</svg>
</body></html>
